package com.woniuxy.commons.service;

import com.woniuxy.commons.dto.AuthDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Auther: 王敞
 * @E-mail： 365799712@qq.com
 * @Date: 2020/07/29/11:18
 * @Description:
 */
@FeignClient(name ="AUTH")
public interface RemoteAuthService {

    @PostMapping("/refresh/{refreshToken}")
    public AuthDto refresh(@PathVariable("refreshToken") String refreshToken);

    @PostMapping("/hasRole/{refreshToken}/{role}")
    public boolean hasRole(@PathVariable("refreshToken") String refreshToken, @PathVariable("role")String role );

}
